home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Requesting a new frame sh.2 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Requesting a new frame shape
  2. Sent:        6/12/96 1:44 PM
  3. Received:    6/12/96 2:31 PM
  4. From:        Neal Williams, neal@corda.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >>I am requesting a new frame shape for my frame, but it's not working
  9. >right.
  10. >>
  11. >>Here is the code I use:
  12. >>
  13. >>ODShape* TheShapeIWant = MyODFrame->CreateShape(ev);
  14. >>TheShapeIWant->SetRectangle(ev, &MyODRect);
  15. >>ODShape* MyNewShape = MyODFrame->RequestFrameShape(ev,
  16. >TheShapeIWant,
  17. >>kODNULL);
  18. >>MyODFrame->Invalidate(ev, kODNULL, kODNULL);
  19. >>MyODFrame->ChangeUsedShape(ev, kODNULL, kODNULL);    
  20. >>MyODFrame->InvalidateActiveBorder(ev);
  21. >>MyNewShape->Release(ev);
  22. >>TheShapeIWant->Release(ev);
  23. >>
  24. >>After executing this code my active border changes to be the size of my
  25. >>frame shape, but the clip-shape and active-shape of my facet don't
  26. >appear
  27. >>to be updating correctly. Afterwards, If I click in the undisplayed
  28. >portion
  29. >>of my frame I get a one-way trip to the debugger.
  30. >>
  31. >>BTW, I'm embeded within ODF Draw.
  32. >>
  33. >>I used this same code in my non-ODF OpenDoc part and everything
  34. >worked
  35. >>fine.
  36. >>
  37. >>-Neal
  38. >
  39. >I don't know yet why the clipshape is not updated. For the active shape 
  40. >your are responsible to update it. When you call RequestFrameShape, 
  41. >FrameShapeChanged is not called so you need to update both your used 
  42. >shape and active shape the same way you do it in FrameShapeChanged.
  43. >
  44. >........................................................................
  45. > Henri Lamiraux                                      lamiraux@apple.com
  46. > Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  47. >........................................................................
  48. >
  49.  
  50. I added the code to update the active shape and it still didn't work. I
  51. then dug around in the FW code and found the method
  52. FW_CFrame::RequestFrameShape(), I tried using it instead and now everything
  53. works fine : )
  54.  
  55. -Neal
  56.